package com.AJava1710D.设计模式.代理模式.dong.jdk;

import java.lang.reflect.Proxy;

/**
 * 作者: LCG
 * 日期: 2020/6/28 10:38
 * 描述:
 */
public class TestMy00 {

    public static void main(String[] args) {

       /* My00InvocationHandler my00InvocationHandler=new My00InvocationHandler();

        Class<TestMy00Api> testMy00ApiClass = TestMy00Api.class;

        Class<?>[] clsses={testMy00ApiClass};

        TestMy00Api testMy00Api = (TestMy00Api)Proxy.newProxyInstance(testMy00ApiClass.getClassLoader(), clsses, my00InvocationHandler);

        testMy00Api.tttt("88888");*/

       //测试二
        TestMy00Api testMy00Api=new TestMy00ApiImpl();
        My02InvocationHandler my02InvocationHandler=new My02InvocationHandler(testMy00Api);

        TestMy00Api testMy00Api02 = (TestMy00Api)Proxy.newProxyInstance(TestMy00ApiImpl.class.getClassLoader(), TestMy00ApiImpl.class.getInterfaces(), my02InvocationHandler);


        testMy00Api02.tttt("99999");
    }

}
